<?php 
include "../../jerimum/classes/bd.php";
include "../../jerimum/classes/videos.php";
$_vid	= new videos();
$id		= $_REQUEST["id"];
$url	= $_REQUEST["url"];
$tipo	= $_REQUEST["tipo"];
$dados	= $_vid->lista("WHERE anuncio = '$id' ",false,false);
$quant	= count($dados);

if($quant < 7){
$cadastra = $_vid->cadastra($url,$id,$tipo);

if($cadastra== true){
	echo $id;
}else{
	echo "0";	
	}
}else{

echo "3";

}


?>